<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel="stylesheet" href="../bootstrap/css/bootstrap.min.css" />
<script type="text/javascript" src="../js/jquery-2.2.3.min.js"></script>
<script type="text/javascript" src="../js/laydate.js"></script>
<script type="text/javascript" src="../bootstrap/js/bootstrap.min.js"></script>
<script type="text/javascript" src="../js/examine.js"></script>
<title>审批管理</title>
<style type="text/css">
a{
		text-decoration:none;
}
#approvalQueryModel, #approvalDetailModel {
	width: 500px;
	height: 260px;
	z-index: 1000;
	position: fixed;
	top: 50%;
	margin-top: -180px;
	left: 50%;
	margin-left: -300px;
	background: #fff;
	border: 1px solid rgba(39, 38, 38, 0.31);
	border-radius: 10px;
	padding: 15px;
	box-shadow: 2px 2px 5px #333333;
}
</style>
</head>
<body>
	<div class="container" style="width: 100%; padding: 25px 15px;">
		<div class="row clearfix">
			<div class="col-md-12 column" style="padding: 20px;">
				<button type="button" class="btn btn-primary btn"
					onclick="openQueryView()" style="float: right;">查询</button>
				<div id="approvals"></div>
			</div>


			<!-- 审批详情窗口 -->
			<div id="approvalDetailModel" style="display: none;">
			<!-- 存审批号 -->
			<input type="hidden" name="a_id" id="a_id" value=""/>
			<input type="hidden" id="aa_type" value=""/>
			<!-- 这是加班的 -->
				<table class='table table-hover' id="overTimeDetail" style="display:none;">
				
					<tr>
						<td colspan="3">发起人：<span id=oname></span>
						</td>
					</tr>

					<tr>
						<td colspan="1">开始时间：<span id="ostarttime"></span>

						</td>
						
						<td colspan="1" align="right">结束时间：<span id="oendtime"></span>

						</td>
					</tr>
					<tr>
						<td colspan="3">加班描述：<span id="description"></span>
						</td>
					</tr>
					<tr>
						<td><input type="button" value="同意" onclick="approval('agree')"
							class="btn btn-primary btn" style="margin-left: 80px;" /></td>
						<td><input type="text" value="拒绝" onclick="approval('disagree')"
							style="width: 54px; margin-left: 80px;"
							class="btn btn-primary btn" /></td>
						<td><input type="text" value="关闭"
							style="width: 54px; margin-left: 80px;"
							class="btn btn-primary btn" onclick="openDetailView()" /></td>
					</tr>
				</table>
				
				
				
			<!-- 这是请假的 -->
				<table class='table table-hover' id="holidayDetail" style="display:none;">
				
					<tr>
						<td colspan="3">发起人：<span id="hname"></span>
						</td>
					</tr>

					<tr>
						<td colspan="3">请假类型：<span id="holidayType"></span>

						</td>
					</tr>
					<tr>
						<td colspan="1">开始时间：<span id="starttime"></span>

						</td>
						
						<td colspan="1" align="right">结束时间：<span id="endtime"></span>

						</td>
					</tr>
					<tr>
						<td colspan="3">请假原因：<span id="reason"></span>
						</td>
					</tr>
					<tr>
						<td><input type="button" value="同意" onclick="approval('agree')"
							class="btn btn-primary btn" style="margin-left: 80px;" /></td>
						<td><input type="text" value="拒绝"  onclick="approval('disagree')"
							style="width: 54px; margin-left: 80px;"
							class="btn btn-primary btn" /></td>
						<td><input type="text" value="关闭" 
							style="width: 54px; margin-left: 80px;"
							class="btn btn-primary btn" onclick="openDetailView()" /></td>
					</tr>
				</table>


				<!-- 这是报销的 -->
				<table class='table table-hover' id="reimbursementDetail" style="display:none;">
				
					<tr>
						<td colspan="3">发起人：<span id="rname"></span>
						</td>
					</tr>

					<tr>
						<td colspan="3">报销项目名：<span id="rb_name"></span>

						</td>
					</tr>
					<tr>
						<td colspan="1">单价：<span id="rb_price"></span>

						</td>
						
						<td colspan="1" align="right">单位：<span id="rb_company"></span>

						</td>
					</tr>
					<tr>
						<td><input type="button" value="同意" onclick="approval('agree')"
							class="btn btn-primary btn" style="margin-left: 80px;" /></td>
						<td><input type="text" value="拒绝" onclick="approval('disagree')"
							style="width: 54px; margin-left: 80px;"
							class="btn btn-primary btn" /></td>
						<td><input type="text" value="关闭"
							style="width: 54px; margin-left: 80px;"
							class="btn btn-primary btn" onclick="openDetailView()" /></td>
					</tr>
				</table>
				
				
				<!-- 这是申领的 -->
				<table class='table table-hover' id="GCDetail" style="display:none;">
				
					<tr>
						<td colspan="3">发起人：<span id=gcname></span>
						</td>
					</tr>

					<tr>
						<td colspan="1">申领物品：<span id="gc_name"></span>

						</td>
						
						<td colspan="1" align="right">申领数量：<span id="gc_number"></span>

						</td>
					</tr>
					<tr>
						<td><input type="button" value="同意" onclick="approval('agree')"
							class="btn btn-primary btn" style="margin-left: 80px;" /></td>
						<td><input type="text" value="拒绝" onclick="approval('disagree')"
							style="width: 54px; margin-left: 80px;"
							class="btn btn-primary btn" /></td>
						<td><input type="text" value="关闭"
							style="width: 54px; margin-left: 80px;"
							class="btn btn-primary btn" onclick="openDetailView()" /></td>
					</tr>
				</table>



				<!-- 这是申购的 -->
				<table class='table table-hover' id="GPDetail" style="display:none;">
				
					<tr>
						<td colspan="3">发起人：<span id=gpname></span>
						</td>
					</tr>

					<tr>
						<td colspan="1">申购物品：<span id="gp_name"></span>

						</td>
						
						<td colspan="1" align="right">申购数量：<span id="gp_number"></span>

						</td>
					</tr>
					<tr>
						<td colspan="1">单价：<span id="gp_dprice"></span> 元

						</td>
						<td colspan="1">总价：<span id="gp_zprice"></span> 元

						</td>
						
					
					</tr>
					<tr>
						<td><input type="button" value="同意" onclick="approval('agree')"
							class="btn btn-primary btn" style="margin-left: 80px;" /></td>
						<td><input type="text" value="拒绝" onclick="approval('disagree')"
							style="width: 54px; margin-left: 80px;"
							class="btn btn-primary btn" /></td>
						<td><input type="text" value="关闭"
							style="width: 54px; margin-left: 80px;"
							class="btn btn-primary btn" onclick="openDetailView()" /></td>
					</tr>
				</table>
				
				
			</div>

			<!-- 审批查询窗口 -->
			<div id="approvalQueryModel" style="display: none;">
				<table class='table table-hover'>
					<tr>
						<td><span style="padding-left: 0px">按审批类型: <select
								name="a_type" id="a_type" class="xiala">
									<option value="">请选择</option>
									<option value="1">加班</option>
									<option value="2">请假</option>
									<option value="3">报销</option>
									<option value="4">申领</option>
									<option value="5">申购</option>
							</select></td>


					</tr>
					<tr>
						<td colspan="2">按名字： <input type="text" name="empName"
							id="empName" value="" />
						</td>


					</tr>
					<tr>
						<td colspan="2">按申请时间: <input readonly="readonly" type="text"
							id="c_time" name="c_time" value="" /> 至今

						</td>



					</tr>
					<tr>
						<td><input type="button" value="查询"
							onclick="showApprovals('1')" class="btn btn-primary btn"
							style="margin-left: 80px;" /></td>
						<td><input type="text" value="关闭"
							style="width: 54px; margin-left: 80px;"
							class="btn btn-primary btn" onclick="openQueryView()" /></td>
					</tr>
				</table>
			</div>
		</div>
	</div>
</body>
<script type="text/javascript">
laydate.render({
	elem : '#c_time'//指定元素
	,
	format : 'yyyy-MM-dd HH:mm:ss'
});
	var queryHol = document.getElementById("approvalQueryModel");
	var detailHol = document.getElementById("approvalDetailModel");
	var holidayDetail = document.getElementById("holidayDetail");
	var reimbursementDetail = document.getElementById("reimbursementDetail");
	var GCDetail = document.getElementById("GCDetail");
	var GPDetail = document.getElementById("GPDetail");
	var overTimeDetail = document.getElementById("overTimeDetail");
</script>
</html>